<template>
	<view class="content">
		<!-- 搜索  不含搜索功能 -->
		<view class="search area">
			<view class="search-input">
				<icon class="search-icon" color="#000" size="16" type="search" ></icon>
				<text class="search-tit">请输入关键词</text>
			</view>
		</view>
		<!-- 轮播图 -->
		<swiper class="swiperPic area" :indicator-dots="true" :autoplay="true" circular="true" :interval="3000" :duration="1000">
				<swiper-item >
					<view class="swiper-item">
						<image src="../../static/pic/1.jpeg" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../static/pic/2.jpeg" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../static/pic/3.jpeg" mode=""></image>
					</view>
				</swiper-item>
			</swiper>
		<!-- 宫格 -->
		<view class="grid area">
			<view class="grid-item">
				<view class="grid-item-cricle">
					<text class="iconfont icon-shangpin"></text>
				</view>
				<text>全部商品</text>
			</view>
			<view class="grid-item">
				<view class="grid-item-cricle">
					<text class="iconfont icon-youhuiquan"></text>
				</view>
				<text>优惠卷</text>
			</view>
			<view class="grid-item" @tap="toIntegral()">
				<view class="grid-item-cricle">
					<text class="iconfont icon-zhangdan"></text>
				</view>
				<text>积分商品</text>
			</view>
			<view class="grid-item">
				<view class="grid-item-cricle">
					<text class="iconfont icon-chaozhijifen"></text>
				</view>
				<text>积分签到</text>
			</view>
		</view>
		<!-- 限时拼团 -->
		<view class="buy-fruits area">
			<view class="buy-fruits-tit">限时拼团</view>
			<view class="fruits-goods">
				<view class="fruits-item">
					<image src="../../static/pic/xj.jpeg" mode=""></image>
					<view>
						<text>香蕉</text>
						<text class="price">￥10.00</text>
					</view>
				</view>
				<view class="fruits-item">
					<image src="../../static/pic/smt.jpeg" mode=""></image>
					<view>
						<text>水蜜桃</text>
						<text class="price">￥10.00</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
			toIntegral(){
				console.log("666");
				uni.navigateTo({
					url:"../integral/integral"
				})
			}
		}
	}
</script>

<style lang="scss">
	.area {
		margin: 0 auto;
		width: 96%;	
		margin-top: 20rpx;
		background-color: #FFFFFF;
	}
	.search {	
		height: 100rpx;
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
	.search-input {
			display: flex;
			align-items: center;
			background-color: #F7F8FA;
			width: 90%;
			height: 60rpx;
			border-radius: 30rpx;
			.search-tit {
				font-size: 26rpx;
				color: #999;
			}
			.search-icon {
				margin: 0 20rpx;
				margin-right: 10rpx;
			}
		}
	}
	// 轮播图
	.swiperPic {
		height: 400rpx;	
		.swiper-item {
			width: 100%;
			height: 100%;
			
			image {
				width: 100%;
				height: 100%;
				border-radius: 20rpx;
			}
		}
	}
	// 一字宫格
	.grid {
		
		display: flex;
		height: 200rpx;
		background-color: #FFFFFF;
		.grid-item {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;
			.grid-item-cricle {
				width: 90rpx;
				height: 90rpx;
				border-radius: 50%;
				background-color: #979EE9;
				display: flex;
				align-items: center;
				justify-content: center;
				margin-bottom:10rpx ;
				.iconfont {
					font-size: 56rpx;
					color: #fff;
				}
				.icon-youhuiquan {
					font-size: 68rpx;
				}
				.icon-zhangdan {
					font-size: 54rpx;
					font-weight: 600;
				}
				.icon-chaozhijifen {
					font-size: 50rpx;
				}
				
			}
			
		}
	}
	.buy-fruits {
		overflow: hidden;
		.buy-fruits-tit {
			margin: 10rpx 0  0 20rpx  ;
			font-size: 34rpx;
		}
		.fruits-goods {
			height: 400rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			.fruits-item {
				image {
					width: 240rpx;
					height: 240rpx;
				}
				view {
					display: flex;
					flex-direction: column;
					text-align: center;
					justify-content: center;
					.price {
						color: #F37C28;
					}
				}
			}
			
		}
	}





</style>
